import { createApp } from 'vue'
import  { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from '@/router'
// import "@/mock/index.js"

const pinia = createPinia() // 创建 Pinia 实例
const app = createApp(App) // 生成 Vue 实例 app

app.use(pinia) // 注册 Pinia 实例
app.use(ElementPlus) // 引用 ElementPlus
app.use(router) // 引用路由实例

app.mount('#app') // 挂载到 #app

// 自定义日志打印
window.clog = function(msgKey, msgValue, {
    bgColor = 'green',
    fontColor = 'white'
}= {}) {
    console.log(`%c${msgKey}`, `background:${bgColor};color:${fontColor};padding: 2px 4px;`,msgValue);
}